package com.demo.gulimall.ware.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 商品库存
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("wms_ware_sku")
public class WareSku implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** sku_id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`sku_id`")
	private Long skuId;

	/** 仓库id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`ware_id`")
	private Long wareId;

	/** 库存数 */
	@TableField(value = "`stock`")
	private Integer stock;

	/** sku_name */
	@TableField(value = "`sku_name`")
	private String skuName;

	/** 锁定库存 */
	@TableField(value = "`stock_locked`")
	private Integer stockLocked;

}
